Show:

Q drawers Class

Creates an area that behaves like position: fixed in most modern browsers, including ones on touchscreens. Often used for fixed areas that wind up covered by content as it scrolls over the areas.

Constructor

Q drawers

(
  • [$options]
  • [$options.triggers=['{{Q}}/img/drawers/up.png',
  • [$options.fullscreen=Q.info.isAndroidStock
  • [$options.beforeSwap=new
  • [$options.onSwap=new
)

Parameters:

  • [$options] Array optional

    Provide options for this tool

    • [drawers] Array optional

      Array of strings holding html for drawers

    • [container=null] String optional

      Optional jQuery selector for handling scrolling

    • [initial] Array optional

      Information for the initial animation

      • [index=1] Integer optional
        The index of the drawer to show, either 0 or 1
      • [delay=0] Integer optional
        Delay before starting initial animation
      • [duration=300] Integer optional
        The duration of the initial animation
      • [ease=Q.Animation.linear] Function optional
        The easing function of the initial animation
    • [transition] Array optional

      Information for the transition animation

      • [duration=300] Integer optional
        The duration of the transition animation
      • [ease=Q.Animation.linear] Function optional
        The easing function of the transition animation
    • [width] Function optional

      Override the function that computes the width of the drawers

    • [height] Function optional

      Override the function that computes the height drawers tool

    • [heights=[100,100] Array optional

      Array of [height0, height1] for drawers that are pinned

    • [placeholders=['',''] Array optional

      Array of [html0, html1] for drawers that are pinned

    • [behind=[true,false] Array optional

      Array of [boolean0, boolean1] to indicate which drawer is behind the others

    • [bottom=[false,false] Array optional

      Array of [boolean0, boolean1] to indicate whether to scroll to the bottom of a drawer after switching to it

    • [trigger] Array optional

      Options for the trigger elements

      • [rightMargin=10] Integer optional
        How many pixels from the right side of the drawers
    • [transition=300] Integer optional

      Number of milliseconds for fading in the trigger images

    • [foregroundZIndex=50] Integer optional

      The z-index of the drawer in the foreground

  • [$options.triggers=['{{Q}}/img/drawers/up.png', Array

    '{{Q}}/img/drawers/down.png']] Array of [src0, src1] for img elements that act as triggers to swap drawers. Set array elements to false to avoid rendering a trigger.

  • [$options.fullscreen=Q.info.isAndroidStock Boolean

    && Q.info.isAndroid(1000)]] Whether the drawers should take up the whole screen

  • [$options.beforeSwap=new Integer

    Q.Event()] Occurs right before drawer swap

  • [$options.onSwap=new Integer

    Q.Event()] Occurs right after drawer swap

Item Index